package com.nulldev.util.security.encryptAPI_rw.api;

import java.io.InputStream;
import java.io.OutputStream;

public interface IStandardStreamingCipherWithIV extends IStandardStreamingCipher {

	@Override
	default ICipherType getCipherType() {
		return ICipherType.PRIVATE_KEY_IV;
	}

	@Override
	default long decrypt(final InputStream is, final OutputStream os, final byte[] privateKey) {
		throw new UnsupportedOperationException("An IV is required for this cipher!");
	}

	@Override
	default long encrypt(final InputStream is, final OutputStream os, final byte[] privateKey) {
		throw new UnsupportedOperationException("An IV is required for this cipher!");
	}

	public long encrypt(final InputStream is, final OutputStream os, final byte[] privateKey, final byte[] iv);

	public long decrypt(final InputStream is, final OutputStream os, final byte[] privateKey, final byte[] iv);
}
